CC = gcc
CFLAG = -std=c99 -Wall

all: mvfmake

mvfmake: fmake
	-@cp fmake tests
fmake: fmake.o parse.o build.o global.o
	$(CC) $(CFLAG) -o $@ $?
fmake.o: fmake.c
	$(CC) $(CFLAG) -c $?
parse.o: parse.c
	$(CC) $(CFLAG) -c $?
build.o: build.c
	$(CC) $(CFLAG) -c $?
global.o: global.c
	$(CC) $(CFLAG) -c $?

test: test.o test0.o test1.o
test.o: test.c 
	$(CC) $(CFLAG) -c $?
test0.o: test0.c
	$(CC) $(CFLAG) -c $?
test1.o: test1.c
	$(CC) $(CFLAG) -c $?
clean:
	-@rm *.o fmake
